﻿/*-----------------------------------------------------------------------------!
! Result class                                                                 !
!------------------------------------------------------------------------------!
! System   : Inventory Management System                                       !
! Client   : UK based                                                          !
! Date     : April 2011                                                        !
! Copyright: (C) KAWISOFT Inc                                                  !
! Program  : Result.cs                                                         !
! Function : get/set message, success information of different operations      !
!------------------------------------------------------------------------------!
! Notes:                                                                       !
! Original author: Md. Shaiful Islam                                           !
! Last changed by: Md. Shaiful Islam, May 02 2011                              !
===============================================================================*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model.Sadharon
{
    public class Result
    {
        // success information
        private Boolean m_IsSuccess;
        public Boolean IsSuccess
        {
            get { return m_IsSuccess; }
            set { m_IsSuccess = value; }
        }

        // general exception information
        private Boolean m_IsException;
        public Boolean IsException
        {
            get { return m_IsException; }
            set { m_IsException = value; }
        }

        // store result information
        private Object m_Result;
        public Object ResultObj
        {
            get { return m_Result; }
            set { m_Result = value; }
        }

        // store success message
        private string m_Message;
        public string Message
        {
            get { return m_Message; }
            set { m_Message = value; }
        }

        // store application exception
        private Exception m_Exception;
        public Exception ApplicationException
        {
            get { return m_Exception; }
            set { m_Exception = value; }
        }

        // constructor
        public Result()
        {
            IsSuccess = false;
            IsException = false;
            ResultObj = null;
            Message = string.Empty;
            ApplicationException = null;
        }
    }
}
